package com.example.spring_transaction.service;

import com.example.spring_transaction.mapper.LogInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @className: LogService
 * @author: 芃
 * @description:
 * @date: 2024/12/30 17:41
 */
@Service
public class LogService {

    @Autowired
    private LogInfoMapper logInfoMapper;

    @Transactional(propagation = Propagation.REQUIRED)
    public Integer addLog(String userName,String op) {
        return logInfoMapper.addLog(userName,op);
    }

}
